#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    //给combobox添加元素
    ui->comboBox->addItem("鸡翅");
    ui->comboBox->addItem("鸡块");

    ui->comboBox_2->addItem("云吞面");
    ui->comboBox_2->addItem("蒸饺");

    ui->comboBox_3->addItem("可乐");
    ui->comboBox_3->addItem("雪碧");
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    //打印所需要的食品，后序可以通过网络的方式发送给其他的地方
    qDebug() << "主食：" << ui->comboBox->currentText() << " 小食: " << ui->comboBox_2->currentText()
             << " 饮料: " << ui->comboBox_3->currentText();
}
